<template>
  <el-menu  class="el-menu-demo" align="left"
    background-color="#545c64"
            text-color="#fff"
            active-text-color="#409eff"
            router
  >
<!--            :unique-opened="true"-->
<!--            :default-openeds="['系统管理']"-->
  >
    <el-submenu  :index="item.name" v-for="(item,index) in menuList" :key="index">
      <template slot="title">
        <i :class="'el-icon-'+item.icon"></i>
        <span>{{item.name}}</span>
      </template>
      <el-menu-item :index="ejcd.url" v-for="(ejcd,index) in item.children" :key="index">{{ejcd.name}}</el-menu-item>
    </el-submenu>

  </el-menu>
</template>

<script>
export default {
  name: "Aside",
    data(){
     return {
       menuList:[]
     }
    },
    created() {
    this.axios.get("/menu/selectMenu").then((resp)=>{
      this.menuList=resp.data;
    });
    }
}
</script>

<style scoped>

</style>
